<template>
  <div>
    根目录
    <el-button>按钮</el-button>

    <div v-for="item in $router.options.routes" :key="item.path">
      <li class="list" @click="$router.push(item.path)">{{ item.path }}===name:{{item.name}}==描述:{{item.meta?.desc}}</li>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter, useRoute } from 'vue-router'
const route = useRoute()
const router = useRouter()

// console.log('router.options.routes', router.options.routes)
</script>

<style scoped lang="scss">
.list{
  list-style:  none;
  height: 30px;
  &:hover{
    cursor: pointer;
    background-color: #d9ecff
  }
}
</style>
